# operators_dict={'<': 'less than','==': 'equal'}
# print("Here is the original dict:")
# for key,value in sorted(operators_dict.items()):
#     print(f'Operator {key} means {value}.')
# operators_dict['>']='greater than'
# print('\n',end="")
# print("The dict was changed to:")
# for key,value in sorted(operators_dict.items()):
#     print(f'Operator {key} means {value}.')
#
#
# survey_list=['Niumei','Niu Ke Le','GURR','LOLO']
# result_dict={'Niumei': 'Nowcoder','GURR': 'HUAWEI'}
# for name in survey_list:
#     if name in result_dict:
#         print(f'Hi,{name}! Thank you for participating in our graduation survey!')
#     else:
#         print(f'Hi, {name}! Could you take part in our graduation survey?')
#

my_dict_1={'name': 'Niuniu','Student ID': 1}
my_dict_2={'name': 'Niumei','Student ID': 2}
my_dict_3={'name': 'Niu Ke Le','Student ID': 3}
dict_list=[]
dict_list.append(my_dict_1)
dict_list.append(my_dict_2)
dict_list.append(my_dict_3)
for user_dict in dict_list:
    print(f"{user_dict['name']}'s student id is {user_dict.get('Student ID')}")

result_dict={'Allen': ['red', 'blue', 'yellow'],'Tom': ['green', 'white', 'blue'],'Andy': ['black', 'pink']}
for key,value in sorted(result_dict.items()):
    print(f"{key}'s favorite colors are:")
    for v in value:
        print(v)


cities_dict={'Beijing': {'Capital': 'China'},'Moscow': {'Capital': 'Russia'},'Paris': {'Capital': 'France'}}
for k,v in sorted(cities_dict.items()):
    # print(type(v))
    i=v.get('Capital')
    # print(i)
    print(f'{k} is the capital of {i}')